package team.dmh.wx.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import team.dmh.wx.netty.Content;

/**
 * @Auther: Hz1kai
 * @Date: 2018/10/23 20:08
 * @Description:
 */
@Api(tags = "聊天接口（仅对接展示用）")
@RestController("/chat")
public class ChatController {


    @ApiOperation("初始化连接时客户端发送消息进行用户绑定")
    @GetMapping("/init")
    public void init(@ApiParam(name = "content" ,value = "type:1;chatMsgInput:{senderId:用户id}") @RequestBody Content content){

    }

    @ApiOperation("发送聊天信息到其他用户")
    @GetMapping("/sendChatMsg")
    public void sendChatMsg(@ApiParam(name = "content" ,value = "type:2,chatMsgInput:{senderId:用户id,accepterId:接受者id,msg:聊天信息}") @RequestBody Content content){

    }
    @ApiOperation("用户接受到推送后进行消息签收")
    @GetMapping("/signed")
    public void signed(@ApiParam(name = "content" ,value = "type:3,chatMsgInput:null,extend:未签消息的id集合,也即是接受到的chatMsgInput里的msgId,有多个id时用逗号隔开") @RequestBody Content content){

    }

    @ApiOperation("心跳保持连接")
    @GetMapping("/keepAlive")
    public void keepAlive(@ApiParam(name = "content" ,value = "type:4,其他都为null") @RequestBody Content content){

    }

    @ApiOperation("拉取通讯录进行更新(用于接受好友请求后)")
    @GetMapping("/pullFriends")
    public void pullFriends(@ApiParam(name = "content" ,value = "type:5,其他都为null") @RequestBody Content content){

    }

    @ApiOperation("拉取好友请求列表进行更新(用于好友请求后接收者进行更新)")
    @GetMapping("/pullFriendRequests")
    public void pullFriendRequests(@ApiParam(name = "content" ,value = "type:6,其他都为null") @RequestBody Content content){

    }
}
